#!/usr/bin/env node

const fs = require('fs'),
      fileName = process.argv[2] || __filename;
try{
  const fid = fs.openSync(fileName, 'r');
  fs.writeSync(1, fs.readFileSync(fid).toString('utf8'));
  fs.closeSync(fid);
}catch(e){
  console.error(e.message);
  process.exit(1);
}

//fs.readSync(fid, buf, 0, size, 0);
//fs.readFileSync(fid);
//log(buf.toString('utf8'));
//fs.closeSync(fid);

